import request from "@/utils/request";

// 学习培训删除
export function articleApistudydelete(articleShareIdList) {
  return request({
    url: `/backAdmin/articleApi/study/delete?articleShareIdList=${articleShareIdList}`,
    method: "post",
  });
}



export function listType(query) {
  return request({
    url: `/backAdmin/articleApi/type/list`,
    method: "get",
    params: query,
  });
}

// 发布文章
export function articleApiadd(data) {
  return request({
    url: `/backAdmin/articleApi/add`,
    method: "post",
    data,
  });
}


// 学习培训添加
export function articleApistudyadd(data) {
  return request({
    url: `/backAdmin/articleApi/study/add`,
    method: "post",
    data,
  });
}

// 学习培训资料列表
export function listStudy(query) {
  return request({
    url: `/backAdmin/articleApi/study/list`,
    method: "get",
    params: query,
  });
}
// 学习培训资料学习情况列表
export function listStudyEmployee(articleId) {
  return request({
    url: `/backAdmin/articleApi/study/list/employee/list?articleId=${articleId}`,
    method: "get",
  });
}

// 查询公告列表
export function listNotice(query) {
  return request({
    url: "/backAdmin/articleApi/list",
    method: "get",
    params: query,
  });
}

// 查询公告详细
export function getNotice(noticeId) {
  return request({
    url: "/system/notice/" + noticeId,
    method: "get",
  });
}

// 新增公告
export function addNotice(data) {
  return request({
    url: "/system/notice",
    method: "post",
    data: data,
  });
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: "/system/notice",
    method: "put",
    data: data,
  });
}

// 删除公告
export function delNotice(articleIdList) {
  return request({
    url: `/backAdmin/articleApi/delete?articleIdList=${articleIdList}`,
    method: "post",
  });
}
